<!DOCTYPE html>
<html>
	<head>
	    <meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
		<link rel="stylesheet" href="$!rc.contextPath/common/weui.min.css">
		<link rel="stylesheet" href="$!rc.contextPath/common/jquery-weui.min.css">
		<link rel="stylesheet" href="$!rc.contextPath/common/common.css">
		<link rel="stylesheet" href="$!rc.contextPath/css/pay.css">
		<title>支付</title>
	</head>
	<body>
	<div class="title">
		<a onClick="javascript:window.history.go(-1)"> < </a>
		支付
	</div>	
	<form onsubmit="return false;">
		<div class="shopping-cart">
			<!-- <div class="countdown">
				<div>
					<img src="../../img/icon/shijian_miaosha.png" alt="" />
				</div>
				<p>请在<span class="clock">05:00</span>秒内完成支付，超时将取消订单</p>
			</div> -->
			<div class="pay-con">
				<div class="pay-con-img">
					#if($!group)
						<img src="$!rc.contextPath/$!group.spellAdvertOne" class="img-responsive" alt="" />
					#else
						<img src="$!rc.contextPath/$!banner" class="img-responsive" alt="" />
					#end
					
				</div>
				<div>
					<div class="pay-infor">
					#if($!group)
						$!group.spellTitle
					#else
						$!sku.skuName
					#end
					</div>
					<div class="count" #if($!group) style="display: none;" #end>
						<span>购买份数：</span>
						<div>
							<span class="minus">-</span>
							#if($!group)
								<span class="num" val="$!group.prePrice" tpn="1" id="skuAmount">$!skuAmount</span>
							#elseif($!limit)
								<span class="num" val="$!limit.prePrice" tpn="2" id="skuAmount">$!skuAmount</span>
							#else
								<span class="num" val="$!sku.promotionPrice" tpn="3" id="skuAmount">$!skuAmount</span>
							#end
							
							<span class="plus">+</span>
						</div>
					</div>
				</div>
			</div>
			<p class="price">价格：<span>￥$!money
				<!-- #if($!group)
					$!group.prePrice
				#elseif($!limit)
					$!limit.prePrice
				#else
					$!sku.promotionPrice
				#end -->
			</span></p>
		</div>

		<div class="total">
			需要支付: <span id="payMoney"></span>
			<!-- <div class="weui-cells weui-cells_checkbox payment-list">
			    <label class="weui-cell weui-check__label " for="s3">
			        <div class="weui-cell__hd">
			          <input type="radio" class="weui-check " name="checkbox1" id="s3" checked="checked">
			          <i class="weui-icon-checked"></i>
			        </div>
			        <div class="weui-cell__bd zhifubao">
			    		<div class="zhifubao-img">
			    			<img src="../../img/pay/zhifubao.png" class="img-responsive" alt="" />
			    		</div>      
			    		<div class="payment">
			    			<p class="payment-title">支付宝</p>
			    			<p class="payment-intro">使用支付宝简单方便</p>
			    		</div>
			        </div>
			    </label>
			    <label class="weui-cell weui-check__label " for="s4">
			        <div class="weui-cell__hd">
			          <input type="radio" name="checkbox1" class="weui-check" id="s4">
			          <i class="weui-icon-checked"></i>
			        </div>
			        <div class="weui-cell__bd weixin">
			        	<div class="weixin-img">
			         		<img src="../../img/pay/weixin.png" class="img-responsive"alt="" />
			        	</div>
			        	<div class="payment">
			    			<p class="payment-title">微信</p>
			    			<p class="payment-intro">使用微信简单方便</p>
			    		</div>
			        </div>
			    </label>
			</div> -->
		</div>
		
		<input type="button" value="安全支付" class="confirm" onclick="f_pay();"/>
	</form>
	<!-- <div class="confirm-bg">	
		<div class="confirm-con">
			<p class="confirm-title">很抱歉、付款失败</p>
				<div class="yes">我知道了</div>
		</div>
	</div> -->
	<div id="ajaxNav">
		
	</div>
	</body>
	<script src="$!rc.contextPath/common/jquery-1.8.3.min.js"></script>
	<script src="$!rc.contextPath/js/pay.js"></script>
	
	<script type="text/javascript">
	function f_pay(){
		
		var payMoney = $("#payMoney").text().replace("¥", "");
		var storeId = sessionStorage.getItem('storeId');
		var skuId = '$!sku.skuId';
		var skuAmount = $("#skuAmount").text();
		var skuPrice = $("#skuAmount").attr("val");
		var tpn = $("#skuAmount").attr("tpn");
		
		window.location.href="$!rc.contextPath/WXJsPay?payMoney=" + payMoney + "&storeId=" + storeId + "&skuId=" + skuId + "&skuAmount=" + skuAmount + "&skuPrice=" + skuPrice + "&tpn=" + tpn;
	}
	</script>
</html>
